﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebServerConnectorDll
{
    public class FridgeConnector
    {
        public static String URL = "http://malve-max.imwork.net/Fridge/";
        //public static String URL = "http://localhost:8080/FridgeECS/";

        public static HttpResponse PostMessage(EStudy pEStudy, EMethod pEMethod, String pPostData)
        {
            String study = Enum.GetName(pEStudy.GetType(), pEStudy);
            String method = Enum.GetName(pEMethod.GetType(), pEMethod);


            return JSON.parse<HttpResponse>(EasyHelper.C5HttpHelperPostResult(URL + study + "?Method=" + method, pPostData));
        }
    }
}
